package com.yf.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;
import org.loulan.application.dragon.common.core.base.BaseEntity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 站点交班记录表
 * @TableName bs_jjb_record
 */
@TableName(value ="bs_jjb_record")
@Data
public class BsJjbRecord extends BaseEntity implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_UUID)
    private String uuid;

    /**
     * 站点id
     */
    private Integer stationId;

    /**
     * 站点名称
     */
    private String stationName;

    /**
     * 开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime startTime;

    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime endTime;

    /**
     * 个人订单总数
     */
    private Integer personOrderTotal;

    /**
     * 车队订单总数
     */
    private Integer fleetOrderTotal;

    /**
     * 退款订单数
     */
    private Integer refundOrderTotal;

    /**
     * 个人总加气量
     */
    private BigDecimal personGasTotal;

    /**
     * 车队总加气量
     */
    private BigDecimal fleetGasTotal;

    /**
     * 退款气量合计
     */
    private BigDecimal refundGasTotal;

    /**
     * 个人总加气金额
     */
    private Integer personalMoneyTotal;

    /**
     * 车队总加气金额
     */
    private Integer fleetMoneyTotal;

    /**
     * 退款金额
     */
    private Integer refundMoneyTotal;

    /**
     * 交班用户id
     */
    private Integer userId;

    /**
     * 交班用户姓名
     */
    private String userName;
    /**
     * 气站让利总额
     */
    private Integer extraMoneyTotal;
    /**
     * 个人应收总额
     */
    private Integer personalShouldTotal;
    /**
     * 个人费率总额
     */
    private Integer personalFeeTotal;
    /**
     * 个人挂牌总额
     */
    private Integer personalGpTotal;
    /**
     * 车队挂牌总额
     */
    private Integer motorcadeGpTotal;


    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public BsJjbRecord(String uuid, Integer stationId, String stationName, LocalDateTime startTime, LocalDateTime endTime, Integer personOrderTotal, Integer fleetOrderTotal, Integer refundOrderTotal, BigDecimal personGasTotal, BigDecimal fleetGasTotal, BigDecimal refundGasTotal, Integer personalMoneyTotal, Integer fleetMoneyTotal, Integer refundMoneyTotal, Integer userId, String userName, Integer extraMoneyTotal, Integer personalShouldTotal, Integer personalFeeTotal, Integer personalGpTotal, Integer motorcadeGpTotal) {
        this.uuid = uuid;
        this.stationId = stationId;
        this.stationName = stationName;
        this.startTime = startTime;
        this.endTime = endTime;
        this.personOrderTotal = personOrderTotal;
        this.fleetOrderTotal = fleetOrderTotal;
        this.refundOrderTotal = refundOrderTotal;
        this.personGasTotal = personGasTotal;
        this.fleetGasTotal = fleetGasTotal;
        this.refundGasTotal = refundGasTotal;
        this.personalMoneyTotal = personalMoneyTotal;
        this.fleetMoneyTotal = fleetMoneyTotal;
        this.refundMoneyTotal = refundMoneyTotal;
        this.userId = userId;
        this.userName = userName;
        this.extraMoneyTotal = extraMoneyTotal;
        this.personalShouldTotal = personalShouldTotal;
        this.personalFeeTotal = personalFeeTotal;
        this.personalGpTotal = personalGpTotal;
        this.motorcadeGpTotal = motorcadeGpTotal;
    }

    public BsJjbRecord() {
    }
}